package com.nearby.demand.interactor;

import com.nearby.demand.utils.KLog;
import com.request.ok.http.callback.StringCallback;
import com.squareup.okhttp.Request;

/**
 * Created by IME on 2015/12/28.
 */
public class LoginInteractorImpl implements LoginInteractor {
    @Override
    public void login(String username, String password, OnLoginListener listener) {
        listener.onSuccess("");
    }

    class MyStringCallback extends StringCallback {
        @Override
        public void onBefore(Request request) {
            super.onBefore(request);
            KLog.i("请求前......");
        }

        @Override
        public void onAfter() {
            super.onAfter();
            KLog.i("请求后......");
        }

        @Override
        public void onError(Request request, Exception e) {
            KLog.i("请求异常结果......" + e.toString());
        }

        @Override
        public void onResponse(String response) {
            KLog.i("请求响应结果......" + response);
            try {
            } catch (Exception e) {
                e.printStackTrace();
                KLog.i("解析-" + e.toString());
            }


        }

        @Override
        public void inProgress(float progress) {
            KLog.i("inProgress......");
        }
    }
}
